import request from "../utils/request";



let doLogin = (username, password) => {
    return request({
        url: '/user/login',
        method: 'POST',
        data: {
            username,
            password
        }
    })
}



let getUserInfo = () => {
    return request({
        url: '/user/info',
        method: 'GET'
    })
}



let goBack = () => {
    return request({
        url: '/user/logout',
        method: 'POST'
    })
}


export default {
    doLogin,
    getUserInfo,
    goBack
}